package com.boco.ibssystem.business.controller;

import com.boco.biinjectionserviceapi.dto.ChssGrjkdaDto;
import com.boco.biinjectionserviceapi.vo.Params;
import com.boco.biinjectionserviceapi.service.IChssGrjkdaService;
import com.boco.ibssystem.common.result.support.ResponseResult;
import com.boco.ibssystem.common.utils.BindingResultUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.List;
import java.util.Map;

/**
 * 描述：
 * 监管：健康档案
 *
 * @author sunshixiong
 * @date 2019/5/10-11:12
 */
@RestController
@ResponseResult
@RequestMapping(value = "/health-record")
@Api(tags = "公卫服务监管-健康档案")
@AllArgsConstructor
public class HealthRecordController {

  @Resource
  private IChssGrjkdaService iChssGrjkdaService;

  /**
   * 个人档案统计信息
   * @param params 参数
   * @return hashMap
   */
  @ApiOperation(value = "获取个人档案统计信息", notes = "获取个人档案统计信息")
  @GetMapping("/person")
  public List<ChssGrjkdaDto> getPersonByParam(@Valid Params params){
    return iChssGrjkdaService.getHealthRecordTendency(params);
  }
}
